/**
 * 删除数据
 * @param {*} db 
 * @param {*} storeName 
 * @param {*} id 
 * @returns 
 */
export function deleteDB(db, storeName, id) {
    const request = db.transaction([storeName], 'readwrite').objectStore(storeName).delete(id)
   
    return new Promise((resolve, reject) => {
      request.onsuccess = function(ev) {
        resolve(ev)
      }
   
      request.onerror = function(ev) {
        resolve(ev)
      }
    })
  }
                          